//
//  HomeBottomView.m
//  ScalperMerchant
//
//  Created by 王云 on 2017/9/29.
//  Copyright © 2017年 WY. All rights reserved.
//

#import "HomeBottomView.h"
#import "SCUser.h"

@implementation HomeBottomView

- (void)awakeFromNib {
    [super awakeFromNib];
    _nameL.userInteractionEnabled = YES;
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(telClick:)];
    [_nameL addGestureRecognizer:tap];
}
- (IBAction)telClick:(id)sender {
    
    [SCTool showAlerts:@"拨打电话" msg:_user.bd_phone Ok:^(id alerts) {
        
        [SCTool openPhoneOrUI];
        
    } Cancel:^(id alerts) {
        
    }];

}

- (void)setUser:(SCUser *)user{
    _user  = user;
    _nameL.text = _user.bd_name;
    _phoneL.text = [NSString stringWithFormat:@"电话:%@",_user.bd_phone];
}

@end
